<template>
  <div>

    <el-scrollbar style="height:auto">
      <el-table :data="dataList" :stripe="true" style="width: 100%" :cell-style="{padding:'30px'}">
        <el-table-column label="反馈申请记录">
          <el-table-column prop="fid" label="序号"></el-table-column>
          <el-table-column prop="content" label="原因"></el-table-column>
          <el-table-column prop="pic_path" label="凭证">
            <template #default="scope">
              <el-image  :src="url+scope.row.pic_path" min-width="70" height="70" alt="" :preview-src-list="url+scope.row.pic_path"></el-image>
              <!--            v-for="item in scope.row.pic_path.split(',')" v-if="item ? item : '' "-->
            </template>
          </el-table-column>
          <el-table-column prop="feedback_Time" label="申请时间"></el-table-column>
          <el-table-column prop="state" label="状态">
            <template #default="scope">
            <span v-if="scope.row.state===0">
              <i class="el-icon-info" style="color: #ccec5b" aria-hidden="true"></i>
            </span>
              <span v-if="scope.row.state===1">
              <i class="el-icon-success" style="color: #39cf7c" aria-hidden="true"></i>
            </span>
              <span v-if="scope.row.state===2">
              <i class="el-icon-error" style="color: #ED3F14" aria-hidden="true"></i>
            </span>
              <span :style="{ color: scope.row.state === 1 ? '#39cf7c' :scope.row.state === 0 ? '#ccec5b':'#ED3F14' }">{{ scope.row.state === 1 ? '已通过' :scope.row.state === 0 ? '待审批':'未通过' }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="fJudge_Time" label="审批时间"></el-table-column>
        </el-table-column>
      </el-table>
    </el-scrollbar>
  </div>
</template>

<script>
import {getFeedBack} from "../../../network/student/getFeedBack";
import {getCurrentInstance} from "vue";
import {ElMessage} from "element-plus";

export default {
  name: 'FeedBack',
  data() {
    return {
      dataList: [],
      disabled: false,
      url: 'http://localhost:7070'
    }
  },
  setup(props){
    const {proxy}=getCurrentInstance();
    const id = localStorage.getItem('StudentId')
    getFeedBack(id).then(result=>{
      console.log(result.data.result)

      // const pic_path=result.data.result.pic_path.split(',')
      // console.log(pic_path)
      proxy.dataList=result.data.result
    }).catch(err=>{

    })






    return{

    }
  }

}
</script>

<style scoped>
.see-more {
  margin: .5em;
  text-align: right;
}
</style>
